3.31.54 \(\int (a+b x)^{-n} (c+d x) (e+f x)^{-1+n} \, dx\) [3054]

Optimal. Leaf size=151 \[ \frac {(d e-c f) (a+b x)^{1-n} (e+f x)^n}{f (b e-a f) n}+\frac {(b (c f-d e (1-n))-a d f n) (a+b x)^{-n} \left (-\frac {f (a+b x)}{b e-a f}\right )^n (e+f x)^{1+n} \, _2F_1\left (n,1+n;2+n;\frac {b (e+f x)}{b e-a f}\right )}{f^2 (b e-a f) n (1+n)} \]

[Out]

(-c*f+d*e)*(b*x+a)^(1-n)*(f*x+e)^n/f/(-a*f+b*e)/n+(b*(c*f-d*e*(1-n))-a*d*f*n)*(-f*(b*x+a)/(-a*f+b*e))^n*(f*x+e
)^(1+n)*hypergeom([n, 1+n],[2+n],b*(f*x+e)/(-a*f+b*e))/f^2/(-a*f+b*e)/n/(1+n)/((b*x+a)^n)

________________________________________________________________________________________

Rubi [A]
time = 0.05, antiderivative size = 150, normalized size of antiderivative = 0.99, number of steps used = 3, number of rules used = 3, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {80, 72, 71} \begin {gather*} \frac {(a+b x)^{-n} (e+f x)^{n+1} \left (-\frac {f (a+b x)}{b e-a f}\right )^n (-a d f n+b c f-b d e (1-n)) \, _2F_1\left (n,n+1;n+2;\frac {b (e+f x)}{b e-a f}\right )}{f^2 n (n+1) (b e-a f)}+\frac {(a+b x)^{1-n} (d e-c f) (e+f x)^n}{f n (b e-a f)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[((c + d*x)*(e + f*x)^(-1 + n))/(a + b*x)^n,x]

[Out]

((d*e - c*f)*(a + b*x)^(1 - n)*(e + f*x)^n)/(f*(b*e - a*f)*n) + ((b*c*f - b*d*e*(1 - n) - a*d*f*n)*(-((f*(a +
b*x))/(b*e - a*f)))^n*(e + f*x)^(1 + n)*Hypergeometric2F1[n, 1 + n, 2 + n, (b*(e + f*x))/(b*e - a*f)])/(f^2*(b
*e - a*f)*n*(1 + n)*(a + b*x)^n)

Rule 71

Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((a + b*x)^(m + 1)/(b*(m + 1)*(b/(b*c
 - a*d))^n))*Hypergeometric2F1[-n, m + 1, m + 2, (-d)*((a + b*x)/(b*c - a*d))], x] /; FreeQ[{a, b, c, d, m, n}
, x] && NeQ[b*c - a*d, 0] &&  !IntegerQ[m] &&  !IntegerQ[n] && GtQ[b/(b*c - a*d), 0] && (RationalQ[m] ||  !(Ra
tionalQ[n] && GtQ[-d/(b*c - a*d), 0]))

Rule 72

Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Dist[(c + d*x)^FracPart[n]/((b/(b*c - a*d)
)^IntPart[n]*(b*((c + d*x)/(b*c - a*d)))^FracPart[n]), Int[(a + b*x)^m*Simp[b*(c/(b*c - a*d)) + b*d*(x/(b*c -
a*d)), x]^n, x], x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[b*c - a*d, 0] &&  !IntegerQ[m] &&  !IntegerQ[n] &&
(RationalQ[m] ||  !SimplerQ[n + 1, m + 1])

Rule 80

Int[((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Simp[(-(b*e - a*f
))*(c + d*x)^(n + 1)*((e + f*x)^(p + 1)/(f*(p + 1)*(c*f - d*e))), x] - Dist[(a*d*f*(n + p + 2) - b*(d*e*(n + 1
) + c*f*(p + 1)))/(f*(p + 1)*(c*f - d*e)), Int[(c + d*x)^n*(e + f*x)^Simplify[p + 1], x], x] /; FreeQ[{a, b, c
, d, e, f, n, p}, x] &&  !RationalQ[p] && SumSimplerQ[p, 1]

Rubi steps

\begin {align*} \int (a+b x)^{-n} (c+d x) (e+f x)^{-1+n} \, dx &=\frac {(d e-c f) (a+b x)^{1-n} (e+f x)^n}{f (b e-a f) n}-\frac {(b c f-d (b e (1-n)+a f n)) \int (a+b x)^{-n} (e+f x)^n \, dx}{f (-b e+a f) n}\\ &=\frac {(d e-c f) (a+b x)^{1-n} (e+f x)^n}{f (b e-a f) n}-\frac {\left ((b c f-d (b e (1-n)+a f n)) (a+b x)^{-n} \left (\frac {f (a+b x)}{-b e+a f}\right )^n\right ) \int (e+f x)^n \left (-\frac {a f}{b e-a f}-\frac {b f x}{b e-a f}\right )^{-n} \, dx}{f (-b e+a f) n}\\ &=\frac {(d e-c f) (a+b x)^{1-n} (e+f x)^n}{f (b e-a f) n}+\frac {(b c f-b d e (1-n)-a d f n) (a+b x)^{-n} \left (-\frac {f (a+b x)}{b e-a f}\right )^n (e+f x)^{1+n} \, _2F_1\left (n,1+n;2+n;\frac {b (e+f x)}{b e-a f}\right )}{f^2 (b e-a f) n (1+n)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.13, size = 123, normalized size = 0.81 \begin {gather*} \frac {(a+b x)^{-n} (e+f x)^n \left (f (-d e+c f) (a+b x)+\frac {(-b (c f+d e (-1+n))+a d f n) \left (\frac {f (a+b x)}{-b e+a f}\right )^n (e+f x) \, _2F_1\left (n,1+n;2+n;\frac {b (e+f x)}{b e-a f}\right )}{1+n}\right )}{f^2 (-b e+a f) n} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[((c + d*x)*(e + f*x)^(-1 + n))/(a + b*x)^n,x]

[Out]

((e + f*x)^n*(f*(-(d*e) + c*f)*(a + b*x) + ((-(b*(c*f + d*e*(-1 + n))) + a*d*f*n)*((f*(a + b*x))/(-(b*e) + a*f
))^n*(e + f*x)*Hypergeometric2F1[n, 1 + n, 2 + n, (b*(e + f*x))/(b*e - a*f)])/(1 + n)))/(f^2*(-(b*e) + a*f)*n*
(a + b*x)^n)

________________________________________________________________________________________

Maple [F]
time = 0.02, size = 0, normalized size = 0.00 \[\int \left (d x +c \right ) \left (f x +e \right )^{-1+n} \left (b x +a \right )^{-n}\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d*x+c)*(f*x+e)^(-1+n)/((b*x+a)^n),x)

[Out]

int((d*x+c)*(f*x+e)^(-1+n)/((b*x+a)^n),x)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*(f*x+e)^(-1+n)/((b*x+a)^n),x, algorithm="maxima")

[Out]

integrate((d*x + c)*(f*x + e)^(n - 1)/(b*x + a)^n, x)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*(f*x+e)^(-1+n)/((b*x+a)^n),x, algorithm="fricas")

[Out]

integral((d*x + c)*(f*x + e)^(n - 1)/(b*x + a)^n, x)

________________________________________________________________________________________

Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*(f*x+e)**(-1+n)/((b*x+a)**n),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*(f*x+e)^(-1+n)/((b*x+a)^n),x, algorithm="giac")

[Out]

integrate((d*x + c)*(f*x + e)^(n - 1)/(b*x + a)^n, x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\left (e+f\,x\right )}^{n-1}\,\left (c+d\,x\right )}{{\left (a+b\,x\right )}^n} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((e + f*x)^(n - 1)*(c + d*x))/(a + b*x)^n,x)

[Out]

int(((e + f*x)^(n - 1)*(c + d*x))/(a + b*x)^n, x)

________________________________________________________________________________________